# -*- mode: python -*-
###
#
# (c) 2000-2007 Wijnand Modderman <wijnand at tehmaze dot com>
# All rights reserved. See docs/LICENSE
#
###

__revision__ = '$Hg: conference.py,v 42004da20fdf 2007/01/01 17:22:50 +0100 $'

# system imports

# DDB imports
from ddb.access import access
from ddb.tools import syntax

# DDB exports
EXPORT=['Conference']

class Conference:
    @access('n', 'n')
    def join(self, event):
        """<[conference]> [key]

        Attend a conference."""
        if not event.args:
            return event.reply(syntax())
        if ' ' in event.args:
            conference, key = event.args.split(' ', 1)
        else:
            conference = event.args
            key        = None
        event.reply('Attempting to attend conference at %s' % conference)
        event.transport.joinConference(conference, key)

# vim:ts=4:sw=4:et:
